Add application type attribute - #4321
Conversation
b7d2b6b to
53267a2
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change introduces a canonical application ChangesApplication type contracts and models
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsx (1)
130-143: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winUse the canonical application type for all MCP client classification.
isM2mstill uses the grant shape, whileisM2MClientusesisM2MApplication. For an explicitly typedm2mapplication whose grants differ from the legacy client-credentials-only shape, the badge andMcpAccessSectionvisibility disagree with Flow Secret visibility. Reuse one type-based boolean for both decisions.Based on the PR objectives, application type is the canonical discriminator.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsx` around lines 130 - 143, Use the canonical application-type classification consistently in the MCP client flow: replace the grant-based isM2m calculation with the existing isM2MApplication result, then reuse that single boolean for both client type/badge decisions and isFlowNativeClient or McpAccessSection visibility. Keep grantTypes for authorization-code checks, but do not independently infer M2M status from grant shape.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api/application.yaml`:
- Around line 799-803: Update docs/content/guides/application-types.mdx to
document application type values, immutability, legacy custom defaulting,
declarative YAML usage, direct-flow restrictions and attestation requirements,
and full-stack/custom OAuth-profile behavior. In api/application.yaml at lines
799-803, revise the flowSecret descriptions to avoid implying confidential M2M
applications automatically receive a secret. The service_test.go range 2371-2460
requires no direct change; use its covered behavior to keep the documentation
accurate.
In `@backend/internal/application/service.go`:
- Around line 240-244: Update the relevant documentation under docs/content to
cover the application REST type contract in apis.mdx, including the custom
default, enum values, validation, immutability, and create/update/GET/list
behavior; document the declarative YAML type field and accepted values in the
guides; and document browser/M2M direct-flow restrictions plus mobile
platform-attestation requirements for flow initiation.
In `@backend/internal/flow/flowexec/service.go`:
- Around line 302-324: Update the consolidated documentation review at
docs/content/apis.mdx to cover the application type API and declarative YAML
field, including supported values, the custom legacy default, immutability, and
REST/declarative usage; add a relevant guide under docs/content/guides/
describing browser and M2M denial, mobile attestation requirements, and
fullstack/custom profile-derived flow initiation; and document gate_client.port
deployment configuration and default-resolution behavior in the appropriate
server configuration guide. These documentation changes apply to
backend/internal/flow/flowexec/service.go lines 302-324 and
backend/cmd/server/deployment.yaml lines 82-83; neither code site requires a
direct change.
In
`@frontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsx`:
- Around line 117-125: Update the flow-client classification in
EditGeneralSettings around isFlowNativeClient to resolve the application type
once and exclude explicitly typed browser applications alongside mobile and M2M
clients. Use the resolved type as the canonical discriminator, while preserving
the existing OAuth-shape fallback for other application types.
In
`@frontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsx`:
- Around line 225-229: Resolve the canonical application type once near
allowEmbeddedApproach, falling back to the OAuth profile for custom or legacy
templates without a type. Reuse this resolved type for embedded-sign-in
eligibility, mobile attestation messaging, and request construction at the
referenced flows, instead of reading selectedTemplateConfig?.type directly.
- Line 325: Add regression coverage for the creation payload assembled by
ApplicationCreatePage, asserting request bodies include the canonical type for
browser, mobile, and fullstack application creation, plus the MCP M2M override.
Update the relevant page tests with request-level assertions and ensure the new
scenarios meet the project’s 80% coverage expectation.
---
Outside diff comments:
In
`@frontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsx`:
- Around line 130-143: Use the canonical application-type classification
consistently in the MCP client flow: replace the grant-based isM2m calculation
with the existing isM2MApplication result, then reuse that single boolean for
both client type/badge decisions and isFlowNativeClient or McpAccessSection
visibility. Keep grantTypes for authorization-code checks, but do not
independently infer M2M status from grant shape.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: eeffac1e-7f53-496c-bb81-b7192211795f
📒 Files selected for processing (59)
api/application.yamlbackend/cmd/server/bootstrap/01-default-resources.yamlbackend/cmd/server/deployment.yamlbackend/internal/application/application_type_test.gobackend/internal/application/constants.gobackend/internal/application/declarative_resource.gobackend/internal/application/error_constants.gobackend/internal/application/handler.gobackend/internal/application/model/application.gobackend/internal/application/model/constants.gobackend/internal/application/model/constants_test.gobackend/internal/application/service.gobackend/internal/application/service_test.gobackend/internal/application/tools.gobackend/internal/flow/flowexec/error_constants.gobackend/internal/flow/flowexec/service.gobackend/internal/flow/flowexec/service_test.gobackend/internal/system/i18n/core/defaults.gobackend/internal/system/importer/service.gobackend/internal/system/importer/service_test.gobackend/pkg/thunderidengine/providers/model.gofrontend/apps/console/src/features/applications/components/create-application/ConfigureExperience.tsxfrontend/apps/console/src/features/applications/components/create-application/__tests__/ConfigureExperience.test.tsxfrontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsxfrontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsxfrontend/apps/console/src/features/applications/data/application-templates/platform-based/backend.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/browser.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/custom.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/full-stack.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/mobile.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/wallet.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/express.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/mcp-client.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/nextjs.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/node.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/nuxt.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/other.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/react.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/vanilla-js.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/vue.jsonfrontend/apps/console/src/features/applications/models/application-templates.tsfrontend/apps/console/src/features/applications/models/application.tsfrontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsxfrontend/apps/console/src/features/applications/pages/__tests__/ApplicationCreatePage.test.tsxfrontend/apps/console/src/features/applications/utils/__tests__/resolveApplicationType.test.tsfrontend/apps/console/src/features/applications/utils/resolveApplicationType.tsfrontend/packages/i18n/src/locales/en-US.tsinstall/openchoreo/thunderid-oc-resourcetype/samples/resource.yamlsamples/apps/react-sdk-sample/thunderid-config/thunderid-config.yamlsamples/apps/react-vanilla-sample/thunderid-config/basic/thunderid-config.yamlsamples/apps/react-vanilla-sample/thunderid-config/multi-auth/thunderid-config.yamlsamples/apps/wayfinder-sample/thunderid-config/app-native/thunderid-config.yamlsamples/apps/wayfinder-sample/thunderid-config/redirect/thunderid-config.yamltests/integration/flow/authentication/apple_attestation_flow_test.gotests/integration/flow/authentication/attestation_flow_test.gotests/integration/resources/declarative_resources/applications/app-declarative-1.yamltests/integration/resources/declarative_resources/applications/app-declarative-confidential.yamltests/integration/testutils/api_utils.gotests/integration/testutils/models.go
53267a2 to
16e4e24
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
frontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsx (1)
117-125:⚠️ Potential issue | 🟠 MajorDuplicate: exclude typed browser apps from flow-native classification.
isFlowNativeClientexcludes only mobile and M2M. Forapplication.type === 'browser'with no OAuth profile (or a non-public profile), Line 125 remains true, so Line 175 exposes Flow Secret controls even though browser apps cannot initiate flows. Excludebrowseralongside mobile and M2M.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsx` around lines 117 - 125, The isFlowNativeClient classification in EditGeneralSettings currently excludes mobile and M2M clients but not browser applications. Update the condition to also exclude applications whose resolved type is browser, while preserving the existing OAuth and grant-type checks for other application types.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@backend/internal/application/model/application.go`:
- Around line 74-79: Update docs/content/apis.mdx and the relevant
application/flow guides under docs/content/guides/ to document the Application
type field, supported values, immutability, and custom default; document the
declarative YAML type field and valid values; and describe type-specific
flow-initiation restrictions for browser/M2M applications plus mobile
attestation requirements. The sibling model site at
backend/internal/application/model/application.go lines 94-104 requires no
direct change because this is a consolidated documentation-only update.
In `@backend/internal/flow/flowexec/service.go`:
- Around line 312-324: Update the application-type switch in the flow initiation
resolver to route providers.ApplicationTypeCustom through
resolveFlowInitiationModeFromProfile, matching the existing FullStack behavior.
Keep missing application types’ existing custom resolution and preserve Mobile
attestation validation plus the default denial for other types.
---
Duplicate comments:
In
`@frontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsx`:
- Around line 117-125: The isFlowNativeClient classification in
EditGeneralSettings currently excludes mobile and M2M clients but not browser
applications. Update the condition to also exclude applications whose resolved
type is browser, while preserving the existing OAuth and grant-type checks for
other application types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e5fe1ad2-dbc0-4084-9f68-fe50573dd344
📒 Files selected for processing (61)
api/application.yamlbackend/cmd/server/bootstrap/01-default-resources.yamlbackend/cmd/server/deployment.yamlbackend/internal/application/application_type_test.gobackend/internal/application/constants.gobackend/internal/application/declarative_resource.gobackend/internal/application/error_constants.gobackend/internal/application/handler.gobackend/internal/application/model/application.gobackend/internal/application/model/constants.gobackend/internal/application/model/constants_test.gobackend/internal/application/service.gobackend/internal/application/service_test.gobackend/internal/application/tools.gobackend/internal/flow/flowexec/error_constants.gobackend/internal/flow/flowexec/service.gobackend/internal/flow/flowexec/service_test.gobackend/internal/system/i18n/core/defaults.gobackend/internal/system/importer/service.gobackend/internal/system/importer/service_test.gobackend/pkg/thunderidengine/providers/model.gofrontend/apps/console/src/features/applications/components/create-application/ConfigureExperience.tsxfrontend/apps/console/src/features/applications/components/create-application/__tests__/ConfigureExperience.test.tsxfrontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsxfrontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsxfrontend/apps/console/src/features/applications/data/application-templates/platform-based/backend.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/browser.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/custom.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/full-stack.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/mobile.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/wallet.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/express.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/mcp-client.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/nextjs.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/node.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/nuxt.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/other.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/react.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/vanilla-js.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/vue.jsonfrontend/apps/console/src/features/applications/models/application-templates.tsfrontend/apps/console/src/features/applications/models/application.tsfrontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsxfrontend/apps/console/src/features/applications/pages/__tests__/ApplicationCreatePage.test.tsxfrontend/apps/console/src/features/applications/utils/__tests__/resolveApplicationType.test.tsfrontend/apps/console/src/features/applications/utils/resolveApplicationType.tsfrontend/packages/i18n/src/locales/en-US.tsinstall/openchoreo/thunderid-oc-resourcetype/samples/resource.yamlsamples/apps/react-sdk-sample/thunderid-config/thunderid-config.yamlsamples/apps/react-vanilla-sample/thunderid-config/basic/thunderid-config.yamlsamples/apps/react-vanilla-sample/thunderid-config/multi-auth/thunderid-config.yamlsamples/apps/wayfinder-sample/thunderid-config/app-native/thunderid-config.yamlsamples/apps/wayfinder-sample/thunderid-config/redirect/thunderid-config.yamltests/integration/flow/authentication/acr_options_flow_test.gotests/integration/flow/authentication/apple_attestation_flow_test.gotests/integration/flow/authentication/attestation_flow_test.gotests/integration/flow/authentication/flow_secret_flow_test.gotests/integration/resources/declarative_resources/applications/app-declarative-1.yamltests/integration/resources/declarative_resources/applications/app-declarative-confidential.yamltests/integration/testutils/api_utils.gotests/integration/testutils/models.go
🚧 Files skipped from review as they are similar to previous changes (46)
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/full-stack.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/nuxt.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/mcp-client.json
- frontend/apps/console/src/features/applications/pages/tests/ApplicationCreatePage.test.tsx
- backend/internal/application/model/constants.go
- backend/internal/flow/flowexec/error_constants.go
- tests/integration/resources/declarative_resources/applications/app-declarative-confidential.yaml
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/other.json
- tests/integration/resources/declarative_resources/applications/app-declarative-1.yaml
- frontend/packages/i18n/src/locales/en-US.ts
- backend/cmd/server/bootstrap/01-default-resources.yaml
- backend/internal/application/constants.go
- backend/internal/application/error_constants.go
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/wallet.json
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/browser.json
- backend/internal/application/tools.go
- frontend/apps/console/src/features/applications/utils/resolveApplicationType.ts
- frontend/apps/console/src/features/applications/components/create-application/ConfigureExperience.tsx
- backend/internal/application/declarative_resource.go
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/nextjs.json
- backend/pkg/thunderidengine/providers/model.go
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/express.json
- tests/integration/flow/authentication/attestation_flow_test.go
- samples/apps/react-vanilla-sample/thunderid-config/multi-auth/thunderid-config.yaml
- backend/internal/system/importer/service.go
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/node.json
- install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
- backend/internal/application/handler.go
- samples/apps/wayfinder-sample/thunderid-config/redirect/thunderid-config.yaml
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/backend.json
- api/application.yaml
- frontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsx
- backend/internal/application/model/constants_test.go
- tests/integration/flow/authentication/apple_attestation_flow_test.go
- frontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsx
- samples/apps/wayfinder-sample/thunderid-config/app-native/thunderid-config.yaml
- backend/cmd/server/deployment.yaml
- backend/internal/application/service_test.go
- frontend/apps/console/src/features/applications/utils/tests/resolveApplicationType.test.ts
- frontend/apps/console/src/features/applications/components/create-application/tests/ConfigureExperience.test.tsx
- backend/internal/system/i18n/core/defaults.go
- frontend/apps/console/src/features/applications/models/application.ts
- tests/integration/testutils/models.go
- backend/internal/flow/flowexec/service_test.go
- backend/internal/application/service.go
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/vue.json
16e4e24 to
605ecb6
Compare
605ecb6 to
2c8239c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
backend/internal/application/constants.go (1)
37-37: 🚀 Performance & Scalability | 🔵 TrivialSame "type" properties key duplicated across two packages.
propTypehere andapplicationTypePropertyKeyinbackend/pkg/thunderidengine/providers/model.goboth hardcode the literal"type"for what is effectively the same persisted-properties key, read by two independentInboundClientrepresentations. No shared constant ties them together, so a future rename in one place won't be caught by the compiler.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/internal/application/constants.go` at line 37, Unify the persisted-properties key used by propType in the constants package and applicationTypePropertyKey in the InboundClient model by defining one shared exported constant and referencing it from both locations. Remove the duplicate hardcoded "type" literals while preserving the existing key value and behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@backend/internal/application/service.go`:
- Around line 926-928: Update both toProcessedDTO and
buildBasicApplicationResponse to resolve the application type through the
existing providers.InboundClient.ApplicationType() normalization/fallback
instead of reading Properties[propType] directly, so absent or legacy values
produce model.ApplicationTypeCustom. Ensure the resulting Type is populated
consistently in REST responses and remains compatible with
validateApplicationForUpdate’s first-time assignment behavior; update the
affected tests to expect the custom default.
---
Nitpick comments:
In `@backend/internal/application/constants.go`:
- Line 37: Unify the persisted-properties key used by propType in the constants
package and applicationTypePropertyKey in the InboundClient model by defining
one shared exported constant and referencing it from both locations. Remove the
duplicate hardcoded "type" literals while preserving the existing key value and
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7bf43b4b-ba03-46a8-9a77-ea535d7877b9
📒 Files selected for processing (58)
api/application.yamlbackend/cmd/server/bootstrap/01-default-resources.yamlbackend/internal/application/application_type_test.gobackend/internal/application/constants.gobackend/internal/application/declarative_resource.gobackend/internal/application/error_constants.gobackend/internal/application/handler.gobackend/internal/application/model/application.gobackend/internal/application/model/constants.gobackend/internal/application/model/constants_test.gobackend/internal/application/service.gobackend/internal/application/service_test.gobackend/internal/application/tools.gobackend/internal/flow/flowexec/error_constants.gobackend/internal/flow/flowexec/service.gobackend/internal/flow/flowexec/service_test.gobackend/internal/system/i18n/core/defaults.gobackend/internal/system/importer/service.gobackend/internal/system/importer/service_test.gobackend/pkg/thunderidengine/providers/model.gofrontend/apps/console/src/features/applications/components/create-application/ConfigureExperience.tsxfrontend/apps/console/src/features/applications/components/create-application/__tests__/ConfigureExperience.test.tsxfrontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsxfrontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsxfrontend/apps/console/src/features/applications/data/application-templates/platform-based/backend.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/browser.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/custom.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/full-stack.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/mobile.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/wallet.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/express.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/mcp-client.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/nextjs.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/node.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/nuxt.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/other.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/react.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/vanilla-js.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/vue.jsonfrontend/apps/console/src/features/applications/models/application-templates.tsfrontend/apps/console/src/features/applications/models/application.tsfrontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsxfrontend/apps/console/src/features/applications/pages/__tests__/ApplicationCreatePage.test.tsxfrontend/apps/console/src/features/applications/utils/__tests__/resolveApplicationType.test.tsfrontend/apps/console/src/features/applications/utils/resolveApplicationType.tsfrontend/packages/i18n/src/locales/en-US.tsinstall/openchoreo/thunderid-oc-resourcetype/samples/resource.yamlsamples/apps/react-sdk-sample/thunderid-config/thunderid-config.yamlsamples/apps/react-vanilla-sample/thunderid-config/basic/thunderid-config.yamlsamples/apps/react-vanilla-sample/thunderid-config/multi-auth/thunderid-config.yamlsamples/apps/wayfinder-sample/thunderid-config/app-native/thunderid-config.yamlsamples/apps/wayfinder-sample/thunderid-config/redirect/thunderid-config.yamltests/integration/flow/authentication/apple_attestation_flow_test.gotests/integration/flow/authentication/attestation_flow_test.gotests/integration/resources/declarative_resources/applications/app-declarative-1.yamltests/integration/resources/declarative_resources/applications/app-declarative-confidential.yamltests/integration/testutils/api_utils.gotests/integration/testutils/models.go
🚧 Files skipped from review as they are similar to previous changes (43)
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/browser.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/nextjs.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/express.json
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/mobile.json
- backend/internal/flow/flowexec/error_constants.go
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/nuxt.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/other.json
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/wallet.json
- backend/internal/system/importer/service_test.go
- samples/apps/react-vanilla-sample/thunderid-config/multi-auth/thunderid-config.yaml
- frontend/apps/console/src/features/applications/components/create-application/tests/ConfigureExperience.test.tsx
- samples/apps/react-vanilla-sample/thunderid-config/basic/thunderid-config.yaml
- samples/apps/wayfinder-sample/thunderid-config/redirect/thunderid-config.yaml
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/vue.json
- backend/internal/system/importer/service.go
- tests/integration/resources/declarative_resources/applications/app-declarative-confidential.yaml
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/custom.json
- backend/cmd/server/bootstrap/01-default-resources.yaml
- samples/apps/react-sdk-sample/thunderid-config/thunderid-config.yaml
- samples/apps/wayfinder-sample/thunderid-config/app-native/thunderid-config.yaml
- backend/internal/application/declarative_resource.go
- tests/integration/flow/authentication/apple_attestation_flow_test.go
- frontend/apps/console/src/features/applications/components/create-application/ConfigureExperience.tsx
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/vanilla-js.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/react.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/node.json
- install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
- frontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsx
- frontend/packages/i18n/src/locales/en-US.ts
- frontend/apps/console/src/features/applications/utils/resolveApplicationType.ts
- tests/integration/testutils/models.go
- backend/internal/system/i18n/core/defaults.go
- frontend/apps/console/src/features/applications/models/application.ts
- frontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsx
- frontend/apps/console/src/features/applications/models/application-templates.ts
- tests/integration/resources/declarative_resources/applications/app-declarative-1.yaml
- tests/integration/flow/authentication/attestation_flow_test.go
- backend/internal/application/tools.go
- api/application.yaml
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/mcp-client.json
- backend/internal/flow/flowexec/service.go
- backend/internal/flow/flowexec/service_test.go
- frontend/apps/console/src/features/applications/utils/tests/resolveApplicationType.test.ts
2c8239c to
709719e
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
docs/content/guides/applications/manage-applications.mdx (1)
29-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove decorative emojis from the application-type table.
As per coding guidelines, ThunderID documentation does not use emojis in prose or table cells. Remove the ⚛️, 🌐, 📱, and 🤖 markers.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/content/guides/applications/manage-applications.mdx` around lines 29 - 32, Remove the decorative emojis from the Browser App, Full-stack App, Mobile App, and Backend Service labels in the application-type table, preserving the existing text and table structure.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api/application.yaml`:
- Around line 929-935: Update the required lists for
ApplicationCompleteResponse, ApplicationGetResponse, and
BasicApplicationResponse to include type. Keep the existing type property
definitions unchanged while ensuring generated clients treat the canonical
application type as always present in each response.
- Around line 869-873: Update the Flow Secret descriptions in both referenced
application configuration sections to document that eligible fullstack and
custom embedded applications may receive a secret when no OAuth configuration is
present, in addition to confidential non-redirect clients. Preserve the existing
exclusions for browser, mobile, and machine-to-machine applications.
In `@docs/content/guides/applications/manage-applications.mdx`:
- Around line 33-35: Update
docs/content/guides/applications/manage-applications.mdx lines 33-35 to replace
the claim that Custom applications have no type-specific restrictions with the
actual OAuth-profile-dependent behavior. Update
docs/content/guides/applications/application-settings.mdx line 117 to either
list the complete API grant enum or clearly scope the list to Console-supported
values, and document the required confidential, non-redirect, or
embedded/no-OAuth conditions for direct initiation.
In `@docs/content/key-concepts/authentication/integration-models.mdx`:
- Around line 89-91: Update the attestation documentation to state that a Mobile
application must configure at least one supported platform, rather than exactly
one, matching the resolver behavior that accepts Android, Apple, or both
configurations. Keep the surrounding explanation of optional application-level
attestation unchanged.
In
`@frontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsx`:
- Around line 140-141: Update the isFlowNativeClient calculation in
McpConnectTab to reuse the canonical application-type predicate from
EditGeneralSettings, so only resolved fullstack or custom applications can
receive Flow Secret controls. Ensure M2M applications remain excluded even when
oauth2Config is absent, while preserving the existing OAuth and grant-type
checks for eligible applications.
---
Nitpick comments:
In `@docs/content/guides/applications/manage-applications.mdx`:
- Around line 29-32: Remove the decorative emojis from the Browser App,
Full-stack App, Mobile App, and Backend Service labels in the application-type
table, preserving the existing text and table structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 66c02700-5662-4a6f-83b9-053a7b1c9feb
📒 Files selected for processing (61)
api/application.yamlbackend/cmd/server/bootstrap/01-default-resources.yamlbackend/internal/application/application_type_test.gobackend/internal/application/constants.gobackend/internal/application/declarative_resource.gobackend/internal/application/error_constants.gobackend/internal/application/handler.gobackend/internal/application/model/application.gobackend/internal/application/model/constants.gobackend/internal/application/service.gobackend/internal/application/service_test.gobackend/internal/application/tools.gobackend/internal/flow/flowexec/error_constants.gobackend/internal/flow/flowexec/service.gobackend/internal/flow/flowexec/service_test.gobackend/internal/system/i18n/core/defaults.gobackend/internal/system/importer/service.gobackend/internal/system/importer/service_test.gobackend/pkg/thunderidengine/providers/model.godocs/content/guides/applications/application-settings.mdxdocs/content/guides/applications/manage-applications.mdxdocs/content/guides/declarative-configurations/import-resources.mdxdocs/content/key-concepts/authentication/integration-models.mdxfrontend/apps/console/src/features/applications/components/create-application/ConfigureExperience.tsxfrontend/apps/console/src/features/applications/components/create-application/__tests__/ConfigureExperience.test.tsxfrontend/apps/console/src/features/applications/components/edit-application/general-settings/EditGeneralSettings.tsxfrontend/apps/console/src/features/applications/components/edit-application/mcp/McpConnectTab.tsxfrontend/apps/console/src/features/applications/data/application-templates/platform-based/backend.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/browser.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/custom.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/full-stack.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/mobile.jsonfrontend/apps/console/src/features/applications/data/application-templates/platform-based/wallet.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/express.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/mcp-client.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/nextjs.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/node.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/nuxt.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/other.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/react.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/vanilla-js.jsonfrontend/apps/console/src/features/applications/data/application-templates/technology-based/vue.jsonfrontend/apps/console/src/features/applications/models/application-templates.tsfrontend/apps/console/src/features/applications/models/application.tsfrontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsxfrontend/apps/console/src/features/applications/pages/__tests__/ApplicationCreatePage.test.tsxfrontend/apps/console/src/features/applications/utils/__tests__/resolveApplicationType.test.tsfrontend/apps/console/src/features/applications/utils/resolveApplicationType.tsfrontend/packages/i18n/src/locales/en-US.tsinstall/openchoreo/thunderid-oc-resourcetype/samples/resource.yamlsamples/apps/react-sdk-sample/thunderid-config/thunderid-config.yamlsamples/apps/react-vanilla-sample/thunderid-config/basic/thunderid-config.yamlsamples/apps/react-vanilla-sample/thunderid-config/multi-auth/thunderid-config.yamlsamples/apps/wayfinder-sample/thunderid-config/app-native/thunderid-config.yamlsamples/apps/wayfinder-sample/thunderid-config/redirect/thunderid-config.yamltests/integration/flow/authentication/apple_attestation_flow_test.gotests/integration/flow/authentication/attestation_flow_test.gotests/integration/resources/declarative_resources/applications/app-declarative-1.yamltests/integration/resources/declarative_resources/applications/app-declarative-confidential.yamltests/integration/testutils/api_utils.gotests/integration/testutils/models.go
🚧 Files skipped from review as they are similar to previous changes (50)
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/backend.json
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/full-stack.json
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/browser.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/express.json
- frontend/apps/console/src/features/applications/utils/resolveApplicationType.ts
- backend/internal/application/constants.go
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/wallet.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/vue.json
- backend/internal/flow/flowexec/error_constants.go
- install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/mcp-client.json
- samples/apps/react-vanilla-sample/thunderid-config/basic/thunderid-config.yaml
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/nuxt.json
- samples/apps/react-vanilla-sample/thunderid-config/multi-auth/thunderid-config.yaml
- frontend/apps/console/src/features/applications/utils/tests/resolveApplicationType.test.ts
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/react.json
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/other.json
- samples/apps/wayfinder-sample/thunderid-config/redirect/thunderid-config.yaml
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/node.json
- frontend/packages/i18n/src/locales/en-US.ts
- tests/integration/resources/declarative_resources/applications/app-declarative-1.yaml
- backend/pkg/thunderidengine/providers/model.go
- samples/apps/wayfinder-sample/thunderid-config/app-native/thunderid-config.yaml
- samples/apps/react-sdk-sample/thunderid-config/thunderid-config.yaml
- backend/internal/system/importer/service.go
- frontend/apps/console/src/features/applications/models/application-templates.ts
- backend/cmd/server/bootstrap/01-default-resources.yaml
- frontend/apps/console/src/features/applications/models/application.ts
- backend/internal/application/tools.go
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/custom.json
- backend/internal/system/importer/service_test.go
- tests/integration/resources/declarative_resources/applications/app-declarative-confidential.yaml
- frontend/apps/console/src/features/applications/data/application-templates/platform-based/mobile.json
- tests/integration/flow/authentication/attestation_flow_test.go
- frontend/apps/console/src/features/applications/data/application-templates/technology-based/nextjs.json
- frontend/apps/console/src/features/applications/pages/ApplicationCreatePage.tsx
- backend/internal/application/handler.go
- backend/internal/application/declarative_resource.go
- frontend/apps/console/src/features/applications/components/create-application/tests/ConfigureExperience.test.tsx
- backend/internal/system/i18n/core/defaults.go
- frontend/apps/console/src/features/applications/components/create-application/ConfigureExperience.tsx
- tests/integration/testutils/models.go
- tests/integration/testutils/api_utils.go
- backend/internal/application/error_constants.go
- frontend/apps/console/src/features/applications/pages/tests/ApplicationCreatePage.test.tsx
- backend/internal/application/application_type_test.go
- backend/internal/application/model/application.go
- backend/internal/application/service_test.go
- backend/internal/application/service.go
- backend/internal/flow/flowexec/service_test.go
709719e to
b30e7d9
Compare
| @@ -1,5 +1,6 @@ | |||
| { | |||
| "id": "wallet", | |||
| "type": "mobile", | |||
There was a problem hiding this comment.
Can we say wallet is a mobile always? Yes I agree that mobile template behavior is appropriate for this. But having it as mobile doesn't feel right...
Maybe another option is to have generic type that can be used for both mobile and wallets.
@brionmario wdyt?
There was a problem hiding this comment.
Let's take this to a followup PR. @coderabbitai create a issue and assign @Malith-19
There was a problem hiding this comment.
@thiva-k WDYT about wallets? Generally most of the wallets are mobile apps. But if we consider a integration like Ethereum wallet, this is a browser integration right?
There was a problem hiding this comment.
For openid4vci wallets mobile type is fine. May need to think on Ethereum wallets when we bring support
| @@ -1,5 +1,6 @@ | |||
| { | |||
| "id": "mcp-client", | |||
| "type": "browser", | |||
There was a problem hiding this comment.
No,they can be confidential clients too. VSCode, Claude code, etc. support configuring client secrets
There was a problem hiding this comment.
Let's take this to a followup PR. @coderabbitai create a issue and assign @Malith-19
There was a problem hiding this comment.
@thiva-k So shall we categorise it as full stack type or do you prefer to have a dedicated type for the mcp? If the app type does not have the flows integrations (with flow secret) then this falls under the m2m category in our current implementation.
There was a problem hiding this comment.
Having a mcp type should be fine right? This will align with frontend and if we need some additional validations for mcp apps in future, it would be straight-foward.
faecf82 to
8b26813
Compare
ad05c34 to
4fd81c1
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
4fd81c1 to
d04165a
Compare
Purpose
Introduce a canonical
typeattribute on applications (browser,fullstack,mobile,m2m,custom) so the backend, rather than the frontend template id, is the source of truth for platform/client class. This drives type-specific behavior such as flow-secret issuance and flow-initiation mode.🔧 Summary of Breaking Changes
The application
typeattribute is now required at creation. There is no implicit default; an application created without atypeis rejected withAPP-1042(Application type is required).💥 Impact
Any API client, declarative resource, or automation that creates an application without a
typefield will start failing with a 400. The attribute is immutable after creation. The ThunderID Console and the shipped declarative resources already set atype, so they are unaffected.🔄 Migration Guide
Add a
typeto every application-creation request / declarative resource, using one ofbrowser,fullstack,mobile,m2m, orcustom. Usecustomfor applications that do not fit the other classes (it applies no type-specific restrictions).Approach
typeattribute to applications, required and validated on creation.customis the unrestricted class for applications that do not fit the others.browserandm2mcannot initiate flows directly.mobileapps authenticate to the Flow Execution API with platform attestation; attestation must be configured, otherwise flow initiation is rejected. They are never issued a flow secret.fullstackandcustomapps derive the mode from their OAuth profile (embedded uses a flow secret, redirect is blocked).fullstack/customembedded (confidential, non-redirect) apps are issued one;browser,mobile, andm2mnever are.fullstack/mobile, mobile shows an attestation notice, and the canonical type (with an OAuth-shape fallback) drives m2m detection and flow-secret UI.Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit
type(browser, fullstack, mobile, m2m, custom), which is returned in API responses and is immutable (updates must keep it the same).